import Router from 'koa-router'
import config from '../config/config.dev'
import UserController from '../controller/user.controller'

const router = new Router({prefix: '/user'})

router.get('/get_users', UserController.getUsersByUserName)
router.get('/get_user_data', UserController.getUserData)
router.get('/has_login', UserController.hasLogin)
router.get('/logout', UserController.logout)
router.get('/user_exists', UserController.userExists)
router.get('/registry/send_email_vc', UserController.sendEmailVC)
router.get('/registry/check_email_vc', UserController.checkEmailVC)
router.get('/change_user_relative', UserController.changeUserRelative)

router.post('/registry', UserController.registry)
router.post('/change_avatar', UserController.changeAvatar)
router.post('/set_data', UserController.setData)
router.post('/login', UserController.login)
router.post('/change_password', UserController.changePassword)
router.post('/change_username', UserController.changeUsername)

export default router.routes()
